//
//  HeadTableViewCell.m
//  BJS151148-Team8
//
//  Created by lanou3g on 16/3/23.
//  Copyright © 2016年 hyy. All rights reserved.

//[imageView sd_setImageWithURL:[NSURL URLWithString:model.cover_image_url]];

#import "HeadTableViewCell.h"
#import "CFCoverFlowView.h"
#import "UIImageView+WebCache.h"
#import "RecommendedTableViewController.h"
@implementation HeadTableViewCell
//@property(nonatomic,strong)RecommendedTableViewController *ada

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CFCoverFlowView *coverFlowView2 = [[CFCoverFlowView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 150)];
        coverFlowView2.backgroundColor = [UIColor groupTableViewBackgroundColor];
        coverFlowView2.pageItemWidth = 180;
        coverFlowView2.pageItemCoverWidth = 5.0;
        coverFlowView2.pageItemHeight = 100.0;
        coverFlowView2.pageItemCornerRadius = 10.0;
//        设置tag值用来传递
        coverFlowView2.tag = 999;
        
//        [coverFlowView2 setPageItemsWithImageNames:@[recomm.headimage[1], @"11.jpg", @"11.jpg", @"11.jpg", @"11.jpg", @"11.jpg"]];
        [self.contentView addSubview:coverFlowView2];
        coverFlowView2.userInteractionEnabled = YES;
        //自动播放
        coverFlowView2.autoAnimation = YES;
        coverFlowView2.animationDuration = 2;

    }
    return self;
}
- (void)awakeFromNib {
//    self.contentView.backgroundColor = [UIColor redColor];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
//- (void)coverFlowView:(CFCoverFlowView *)coverFlowView didScrollPageItemToIndex:(NSInteger)index {
//    NSLog(@"didScrollPageItemToIndex >>> %@", @(index));
//    
//    //    self.pageControl.currentPage = index;
//}
//
//- (void)coverFlowView:(CFCoverFlowView *)coverFlowView didSelectPageItemAtIndex:(NSInteger)index {
//    NSLog(@"didSelectPageItemAtIndex >>> %@", @(index));
//}
//
//- (IBAction)pageControlAction:(UIPageControl *)sender {
//}

@end
